import {Component, OnInit} from '@angular/core';
import {Router} from "@angular/router";

@Component({
    selector: 'app-identity',
    templateUrl: './identity.page.html',
    styleUrls: ['./identity.page.scss'],
})
export class IdentityPage implements OnInit {
    currentIdentity: number;

    constructor(private route: Router,) {
    }

    ngOnInit() {
        this.currentIdentity = 1;
    }

    choseIdentity(type) {
        this.currentIdentity = type;
    }

    goToPage(url) {
        this.route.navigate([`/${url}`], {queryParams: {type: this.currentIdentity}}).then();
    }
}
